import { defineStore } from "pinia";
export const useInventoryStore = defineStore("inventory", {
  state: () => {
    return {
      IsCover: {
        Dialog: false,
        InfoTable: false,
        BsAudit: false,
        BsEditing: false,
        InfoTable2: false,
        DialogEnd: false,
      },
      infoArr: {},
      infoArr2: {},
    };
  },
  getters: {},
  actions: {
    changeBoolean(name) {
      for (const key in this.IsCover) {
        this.IsCover[key] = false;
        if (key === name) {
          this.IsCover[key] = true;
        }
      }
    },
    reset() {
      for (const key in this.IsCover) {
        this.IsCover[key] = false;
      }
    },
  },
});
